@using Omu.Awesome.Core
@using Rail.Net.Core.Model
@model IPageable<Relation>

@{
    ViewBag.Title = "Index";
}

<h2>Index</h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table class="dataTable">
    <thead>
        <tr>
            <th></th>
            <th>
                RelationNumber
            </th>
            <th>
                Route
            </th>
            <th>
                ValidFrom
            </th>
            <th>
                ValidTo
            </th>
            <th>
                BorderStation
            </th>
            <th>
                DestinationStation
            </th>
            <th>
                RelationRus
            </th>
            <th>
                Descriptions
            </th>
        </tr>
    </thead>
    <tbody>
    @foreach (var item in Model.Page) {
        <tr>
            <td>
                @Html.ActionLink("Edit", "Edit", new { id=item.Id }) |
                @Html.ActionLink("Details", "Details", new { id=item.Id }) |
                @Html.ActionLink("Delete", "Delete", new { id=item.Id })
            </td>
            <td>
			    @item.RelationNumber
            </td>
            <td>
			    @item.Route
            </td>
            <td>
			    @String.Format("{0:g}", item.ValidFrom)
            </td>
            <td>
			    @String.Format("{0:g}", item.ValidTo)
            </td>
            <td>
			    @item.BorderStation
            </td>
            <td>
			    @item.DestinationStation
            </td>        
        </tr>
    }
    </tbody>
</table>


